﻿using AutoMapper;
using static NETCORE.TAutoMappper.MapperProfile;

namespace NETCORE.TAutoMappper
{
    //要继承AutoMapper的Profile
    public class MapperProfile : Profile
    {
        //构造函数
        public MapperProfile()
        {
            //这里写映射规则
            CreateMap<StudentDto, StudentModel>();
            CreateMap<StudentModel, StudentDto>();
        }
    }
}
